
{extend name="index/index" /}

{block name="main"}
<style type="text/css">
    .form-group .col-xs-10{
        width:200px; 
        height:40px; 
        line-height:40px; 
        border:1px solid #CCC; 
    }
    .form-group .default{
       width:200px; 
        height:32px; 
        line-height:32px; 
        color:#999;
    }
    .form-group .error{
        height:32px; 
        line-height:32px; 
        color:#F00; 
    }
    .form-group .success{
        height:32px; 
        line-height:32px; 
        color:#096; 
    }
</style>
        <!-- Content Holder -->
		<div class="eleven columns row content left">
            
            <!-- Blogpost -->
            <div class="eleven columns row alpha blogpost">
                <div class="nine columns row offset-by-one omega">
                    <div class="blogtitle"><h4><a href="#">{$manpower['recruitment_unit']}</a></h4> 
                        <img src="{$manpower['image']}" style="display:inline-block;width:80px;float:right;"><br>
                        <h3>{$manpower['recruitment_position']}</h3>
                    </div>
                    <div class="postinfo">
                        
                        <span class="money" style="margin-right: 1em;font-size: 16px;color: #fd5f39;">{$manpower['salary']} 
                        </span> &nbsp; | &nbsp; {$manpower['job_description']} &nbsp; | &nbsp; 
                        全职
                    </div>
                    
                    <div class="postcontent">
                        <dd class="job-advantage">
                            <span class="advantage">职位诱惑：</span>
                            <p>{$manpower['orporate_welfare']}</p>
                        </dd>
                      
                        <dd class="job_bt">
                            <h4 class="description">职位描述：</h4>
                            <div>
                                
                                <p>1、具备较强的责任感，团队协作精神及良好的沟通能力</p>
                                <p>2、具备良好的逻辑思维，思路清晰，善于思考，能独立分析和解决问题</p>
                                <p>3、有金融相关项目经验者优先</p>
                            </div>
                        </dd>
                       <div class="clear"></div>
                    
                    </div>
                </div>
                <div class="clear"></div>
            </div>
            
            <div>
                <div style="LINE-HEIGHT: 12px" id="bdshare" class="bdshare_b">
                <img
                    src="http://bdimg.share.baidu.com/static/images/type-button-1.jpg">
                </div>
                <script id="bdshare_js" type="text/javascript"
                data="type=button&uid=664845"
                src="http://bdimg.share.baidu.com/static/js/bds_s_v2.js?cdnversion=381133">
                </script>
                <script type="text/javascript">  
                        document.getElementById("bdshare_js").src = "http://bdimg.share.baidu.com/static/js/shell_v2.js?cdnversion=" + new Date().getHours();
                </script>
            </div>
            <!-- Comment Form -->
            <hr><h3>投个简历</h3>
            <form  id="myForm" name="myform" method="post"  target="frame1" class="form-horizontal" action="{:url('index/manpower/doadd')}" onSubmit="return checkForm()">
                <iframe name="frame1" frameborder="0" id="frame" style="display:none;"></iframe>
                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 姓名: </label>
                    <div class="col-sm-9">
                        <input type="text" name="name" class="col-xs-10 col-sm-5" id="name" onBlur="checkname()" oninput="checkname()"/>
                        <span class="default" id="nameErr"></span> 
                    </div>
                </div>
                <div class="space-4"></div>

                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right" for="form-field-2">出生日期: </label>

                    <div class="col-sm-9">
                        <input type="date" name="birthday" class="col-xs-10 col-sm-5" id="birthday" onBlur="checkbirthday()" oninput="checkbirthday()"/>
                        <span class="default" id="birthdayErr"></span> 
                    </div>
                </div>
                <div class="space-4"></div>

                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right" for="form-field-2">毕业院校: </label>

                    <div class="col-sm-9">
                        <input type="text" name="graduate_institutions" class="col-xs-10 col-sm-5" id="graduate" onBlur="checkgraduate()" oninput="checkgraduate()"/>
                        <span class="default" id="graduateErr"></span> 
                    </div>
                </div>

                <div class="space-4"></div>


                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right" for="form-field-2">学历: </label>

                    <div class="col-sm-9">

                        <select name="education_background" class="col-xs-10" id="education" onBlur="checkeducation()" oninput="checkeducation()">
                            <option value="">请选择你的学历</option>
                            <option value="高中">高中</option>
                            <option value="中专">中专</option>
                            <option value="大专">大专</option>
                            <option value="本科">本科</option>
                            <option value="研究生">研究生</option>
                            <option value="博士">博士</option>
                            <option value="海归">海归</option>
                        </select>
                        <span class="default" id="educationErr"></span> 
                    </div>
                </div>
                <div class="space-4"></div>

                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right" for="form-field-2">专业: </label>

                    <div class="col-sm-9">
                        <select name="major" class="col-xs-10" id="major" onBlur="checkmajor()" oninput="checkmajor()">
                            <option value="">请选择你的专业</option>
                            <option value="计算机">计算机</option>
                            <option value="会计学">会计学</option>
                            <option value="英语">英语</option>
                            <option value="德语">德语</option>
                            <option value="韩语">韩语</option>
                            <option value="其他">其他</option>
                        </select>
                        <span class="default" id="majorErr"></span> 
                    </div>
                </div>

                <div class="space-4"></div>

                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right" for="form-field-2">联系方式: </label>

                    <div class="col-sm-9">
                        <input type="text" name="tel" class="col-xs-10 col-sm-5" id="tel" onBlur="checktel()" oninput="checktel()"/>
                        <span class="default" id="telErr"></span> 
                    </div>
                </div>
                <div class="space-4"></div>
                <div >
                    <div class="col-md-offset-3 col-md-9">
                        <button class="btn btn-info" type="submit" >
                            <i class="icon-ok bigger-110"></i>
                            提交
                        </button>

                        &nbsp; &nbsp; &nbsp;
                        <button class="btn" type="reset">
                            <i class="icon-undo bigger-110"></i>
                            重置
                        </button>
                    </div>
                </div>
            </form>
            <div class="clear"></div>
		</div>
       <!-- Sidebar
        ================================================== -->

        <div class="four columns sidebar offset-by-one content">
            
            
            
            <div class="widget">
                <h5>联系信息</h5>
                <div>
                    <a href="#" class="link">公司位置</a><br/>
                    顶尖工作室, 呆橘工程集团有限公司<br/>
                    Mainstreet 123<br/>
                    地址: 上海市静安区万荣路<br/><br/>
                    
                    <a href="#" class="link">如何联系我们</a><br/>
                    电子邮件: <a href="mailto:your@email.com" class="linkbg">li1344747860@qq.com</a><br/>
                    电话: 400-400-400<br/><br/>
                    
                    <a href="#" class="link">办公时间 </a><br/>
                    星期一-星期五:09:00 -18:00<br/>
                    星期六: 10:00 - 15:00
                </div>
            </div>
            <img src="/static/index/images/banner-first.jpg">
            <img src="/static/index/images/banner3.jpg" style="margin-top:50px;">
            <img src="/static/index/images/banner2.jpg" style="margin-top:50px;">
            <div>
                <h5 style="margin-top:60px;">友情链接:</h5>
                <a href="http://sh.itxdl.cn/" target="_blank">上海兄弟连官网:http://sh.itxdl.cn/</a>
            </div>
            
            <div class="clear"></div>
    
        </div>
        
        <!-- Space Adjuster
        ================================================== -->
        
        <div class="sixteen columns bottomadjust"></div>
   
	</div><!-- container -->
<script type="text/javascript"> 
     
    
    function checkname(){ 
        var username = document.getElementById('name'); 
        var errname = document.getElementById('nameErr'); 
        var pattern = /^[A-Za-z0-9\u4e00-\u9fa5]+$/; 
        if(username.value.length == 0){ 
            errname.innerHTML="名字不能为空"
            errname.className="error"
            return false; 
        }if(!pattern.test(username.value)){ 
            errname.innerHTML="名字不合规范"
            errname.className="error"
            return false; 
        }else{ 
            errname.innerHTML="OK"
            errname.className="success"; 
            return true; 
        } 
    } 

    function checkbirthday(){ 
        var username = document.getElementById('birthday'); 
        var errname = document.getElementById('birthdayErr');
        var myDate = new Date();
        var year = myDate.getFullYear();
        var month = myDate.getMonth()+1;
        var date = myDate.getDate();
        var mytime = year.toString()+-month.toString()+-date.toString();
        //console.log(mytime);
        if(username.value.length == 0){ 
            errname.innerHTML="出生日期不能为空"
            errname.className="error"
            return false; 
        }if((username.value)>mytime){ 
            errname.innerHTML="日期不合规范"
            errname.className="error"
            return false; 
        }else{ 
            errname.innerHTML="OK"
            errname.className="success"; 
            return true; 
        } 
    } 


    function checkgraduate(){ 
        var username = document.getElementById('graduate'); 
        var errname = document.getElementById('graduateErr');
        var pattern = /^[A-Za-z0-9\u4e00-\u9fa5]+$/; 
        if(username.value.length == 0){ 
            errname.innerHTML="毕业院校不能为空"
            errname.className="error"
            return false; 
        }if(!pattern.test(username.value)){ 
            errname.innerHTML="毕业院校名称不合规范"
            errname.className="error"
            return false; 
        }else{ 
            errname.innerHTML="OK"
            errname.className="success"; 
            return true; 
        } 
    }

    function checkeducation(){ 
        var username = document.getElementById('education'); 
        var errname = document.getElementById('educationErr'); 
        if(username.value.length == 0){ 
            errname.innerHTML="请选择你的学历"
            errname.className="error"
            return false; 
        }else{ 
            errname.innerHTML="OK"
            errname.className="success"; 
            return true; 
        } 
    }

    function checkmajor(){ 
        var username = document.getElementById('major'); 
        var errname = document.getElementById('majorErr'); 
        if(username.value.length == 0){ 
            errname.innerHTML="请选择你的专业"
            errname.className="error"
            return false; 
        }else{ 
            errname.innerHTML="OK"
            errname.className="success"; 
            return true; 
        } 
    }

    function checktel(){ 
        var username = document.getElementById('tel'); 
        var errname = document.getElementById('telErr'); 
        var pattern = /^1(?:3\d|4[4-9]|5[0-35-9]|6[67]|7[013-8]|8\d|9\d)\d{8}$/; 
        if(username.value.length == 0){ 
            errname.innerHTML="请填写你的手机号"
            errname.className="error"
            return false; 
        }if(!pattern.test(username.value)){ 
            errname.innerHTML="手机号不合规范"
            errname.className="error"
            return false; 
        }else{ 
            errname.innerHTML="OK"
            errname.className="success"; 
            return true; 
        } 
    }

    function tip(){
        alert("提交成功");
        location.reload();
        //var myform = document.getElementById('myForm');
        //var inputs = myform.getElementsByTagName('input');
        //for (var i = 0; i < inputs.length; i++) {
        //    inputs[i].value = '';
        //}
        //$('inputs').attr('value','');
        //console.log(inputs);
        return true;
    }

    function checkForm(){ 
        var nametip = checkname(); 
        var requirement = checkbirthday();  
        var content = checkgraduate(); 
        var logging = checkeducation(); 
        var major = checkmajor();
        var tel = checktel();
        return nametip && requirement && content && logging && major && tel && tip();
    }

</script>
{/block}